package org.example.userdefine.示例代码.parent;

import lombok.Data;
import org.example.cicdi.jpa.SecondBaseEntity;
import org.example.codegenerate.modelext.WebVo.Enum.EnumPageFieldType;
import org.example.codegenerate.modelext.WebVo.annotation.Column.PageVo;
import org.example.codegenerate.modelext.WebVo.annotation.Column.ValidateVo;
import org.example.codegenerate.modelext.WebVo.annotation.table.TVo;
import org.example.codegenerate.modelext.WebVo.annotation.table.WVo;


import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * 只有开关框，联动框有问题，本表中所有的格式都试验，成功。实验人，姜晓东
 */
@WVo
@TVo(entityName = "ColumnTypeTest", tableTxt = "列类型测试"/*, enumTableType = EnumTableType.SINGLETABLE*//*,formTemplate = "1"*/)
@Data
@Entity
@Table( name = "column_type_test")
public class AllPageTypeSample extends SecondBaseEntity {


    @Column(name = "time_column" ,columnDefinition="varchar(120) COMMENT '日期hhmmss'",length = 120)
    @PageVo(fieldShowType = EnumPageFieldType.日期hhmmss,isQuery = 0,isShowForm = 1,isShowList = 1,isReadOnly = 0,orderNum = 1)
    //如果日期为hhmmss，那么类型必须为String
    private String timeColumn;


    @Column(name = "date_column" ,columnDefinition="Date COMMENT '日期yyyymmdd'")
    @PageVo(fieldShowType = EnumPageFieldType.日期yyyymmdd,isQuery = 0,isShowForm = 1,isShowList = 1,isReadOnly = 0,orderNum = 2)
    private Date dateColumn;


    @Column(name = "datetime_column" ,columnDefinition="Date COMMENT '日期yyyymmddhhmmss'")
    @PageVo(fieldShowType = EnumPageFieldType.日期yyyymmddhhmmss,isQuery = 0,isShowForm = 1,isShowList = 1,isReadOnly = 0,orderNum =3)
    private Date datetimeColumn;

    @Column(name = "radio_column" ,columnDefinition="varchar(120) COMMENT '单选框'", length = 120)
    @PageVo(fieldShowType = EnumPageFieldType.单选框,isQuery = 0,isShowForm = 1,isShowList = 1,isReadOnly = 0,orderNum = 4)
    @ValidateVo( dictTable = "jimu_report_map", dictField = "id",dictText = "label")
    //dictTable为数据表,dictField 中的id是所选表的主键，dictText是要显示的列的列名
    private String radioColumn;

    @Column(name = "checkbox_column" ,columnDefinition="varchar(120) COMMENT '多选框'", length = 120)
    @PageVo(fieldShowType = EnumPageFieldType.多选框,isQuery = 0,isShowForm = 1,isShowList = 1,isReadOnly = 0,orderNum = 5)
    @ValidateVo( dictTable = "jimu_report_map", dictField = "id",dictText = "label")
    //dictTable为数据表,dictField 中的id是所选表的主键，dictText是要显示的列的列名
    private String checkboxColumn;

    @Column(name = "sel_search_column" ,columnDefinition="varchar(120) COMMENT '下拉搜索框'", length = 120)
    @PageVo(fieldShowType = EnumPageFieldType.下拉搜索框,isQuery = 0,isShowForm = 1,isShowList = 1,isReadOnly = 0,orderNum = 6)
    @ValidateVo( dictTable = "jimu_report_map", dictField = "id",dictText = "label")
    //dictTable为数据表,dictField 中的id是所选表的主键，dictText是要显示的列的列名
    private String selSearchColumn;

    @Column(name = "list_multi_column" ,columnDefinition="varchar(120) COMMENT '下拉多选框'", length = 120)
    @PageVo(fieldShowType = EnumPageFieldType.下拉多选框,isQuery = 0,isShowForm = 1,isShowList = 1,isReadOnly = 0,orderNum = 7)
    @ValidateVo( dictTable = "jimu_report_map", dictField = "id",dictText = "label")
    //dictTable为数据表,dictField 中的id是所选表的主键，dictText是要显示的列的列名
    private String listMultiColumn;

    @Column(name = "list_column" ,columnDefinition="varchar(120) COMMENT '下拉框'", length = 120)
    @PageVo(fieldShowType = EnumPageFieldType.下拉框,isQuery = 0,isShowForm = 1,isShowList = 1,isReadOnly = 0,orderNum = 8)
    @ValidateVo( dictTable = "jimu_report_map", dictField = "id",dictText = "label")
    //dictTable为数据表,dictField 中的id是所选表的主键，dictText是要显示的列的列名
    private String listColumn;

    /*@Column(name = "switch_column" ,columnDefinition="varchar(120) COMMENT '开关'", length = 120)
    @PageVo(fieldShowType = EnumPageFieldType.开关,isQuery = 0,isShowForm = 1,isShowList = 1,isReadOnly = 0,orderNum =9)
    private String switchColumn;*/

    @Column(name = "file_column" ,columnDefinition="varchar(120) COMMENT '文件'", length = 120)
    @PageVo(fieldShowType = EnumPageFieldType.文件,isQuery = 0,isShowForm = 1,isShowList = 1,isReadOnly = 0,orderNum = 10)
    private String fileColumn;

    @Column(name = "image_column" ,columnDefinition="varchar(120) COMMENT '图片框'", length = 120)
    @PageVo(fieldShowType = EnumPageFieldType.图片,isQuery = 0,isShowForm = 1,isShowList = 1,isReadOnly = 0,orderNum = 11)
    private String imageColumn;


    @Column(name = "pca_column" ,columnDefinition="varchar(120) COMMENT '省市区组件'", length = 120)
    @PageVo(fieldShowType = EnumPageFieldType.省市区组件,isQuery = 0,isShowForm = 1,isShowList = 1,isReadOnly = 0,orderNum = 12)
    private String spcaColumn;

    @Column(name = "sel_depart_column" ,columnDefinition="varchar(120) COMMENT '部门选择'", length = 120)
    @PageVo(fieldShowType = EnumPageFieldType.部门选择,isQuery = 0,isShowForm = 1,isShowList = 1,isReadOnly = 0,orderNum = 13)
    private String selDepartColumn;

    @Column(name = "sel_user_column" ,columnDefinition="varchar(120) COMMENT '用户选择'", length = 120)
    @PageVo(fieldShowType = EnumPageFieldType.用户选择,isQuery = 0,isShowForm = 1,isShowList = 1,isReadOnly = 0,orderNum = 14)
    private String selUserColumn;

    @Column(name = "password_column" ,columnDefinition="varchar(120) COMMENT '密码'", length = 120)
    @PageVo(fieldShowType = EnumPageFieldType.密码,isQuery = 0,isShowForm = 1,isShowList = 1,isReadOnly = 0,orderNum = 15)
    private String passwordColumn;

    @Column(name = "text_column" ,columnDefinition="varchar(120) COMMENT '文本框'", length = 120)
    @PageVo(fieldShowType = EnumPageFieldType.文本框,isQuery = 0,isShowForm = 1,isShowList = 1,isReadOnly = 0,orderNum = 16)
    private String textColumn;

    @Column(name = "popup_column" ,columnDefinition="varchar(120) COMMENT 'Popup弹框'", length = 120)
    @PageVo(fieldShowType = EnumPageFieldType.Popup弹框,isQuery = 0,isShowForm = 1,isShowList = 1,isReadOnly = 0,orderNum = 17)
    @ValidateVo( dictTable = "tj_user_report", dictField = "username",dictText = "popup_column")
    ////dictTable为在线开发中的报表的编码名,显示的时候一个列表。dictField 中的候选的表中的目标列名，dictText是要保存的列的列名。目标是将dictfield中的值传入到dicttext中
    private String popupColumn;

    @Column(name = "sel_tree_column" ,columnDefinition="varchar(120) COMMENT '自定义树控件'", length = 120)
    @PageVo(fieldShowType = EnumPageFieldType.自定义树控件,isQuery = 0,isShowForm = 1,isShowList = 1,isReadOnly = 0,orderNum = 18)
    @ValidateVo( dictTable = "test_shoptype_tree", dictField = "0",dictText = "id,pid,type_name,has_child")
    //dicttable数据表的表名, select * from dictable where dictField=该级别的id值  ;目标是取出该dictField下第一层的子集
    //dictText规定的格式,id是PK，pid是从属关系的id，type_name是要显示的值,has_child是是否有子集合
    private String selTreeColumn;

    @Column(name = "cat_tree_column" ,columnDefinition="varchar(120) COMMENT '分类字典树'", length = 120)
    @PageVo(fieldShowType = EnumPageFieldType.分类字典树,isQuery = 0,isShowForm = 1,isShowList = 1,isReadOnly = 0,orderNum = 19)
    private String catTreeColumn;

    @Column(name = "text_area_column" ,columnDefinition="varchar(120) COMMENT '多行文本'", length = 120)
    @PageVo(fieldShowType = EnumPageFieldType.多行文本,isQuery = 0,isShowForm = 1,isShowList = 1,isReadOnly = 0,orderNum = 20)
    private String textAreaColumn;

    @Column(name = "umeditor_column" ,columnDefinition="varchar(120) COMMENT '富文本'", length = 120)
    @PageVo(fieldShowType = EnumPageFieldType.富文本,isQuery = 0,isShowForm = 1,isShowList = 1,isReadOnly = 0,orderNum = 21)
    private String umeditorColumn;

    @Column(name = "mark_down_column" ,columnDefinition="varchar(120) COMMENT 'MarkDown'", length = 120)
    @PageVo(fieldShowType = EnumPageFieldType.MarkDown,isQuery = 0,isShowForm = 1,isShowList = 1,isReadOnly = 0,orderNum = 22)
    private String MarkDownColumn;

}